<?php

include_once 'Shared/Models/Vacancy.php';
class default_PortalController extends Vi_Controller_Action
{
	public function indexAction()
	{
		$objVacancy = new Models_Vacancy();
		$objPortal = new Models_Portal();
		$portalAlias = Vi_Registry::getAppName();
		$portal = $objPortal->getPortalbyAlias($portalAlias);
		$portal = current($portal);
		$portalId = $portal['portal_id'];
        $recentVacancy = $objVacancy->getRecentVacancy($portalId, 7);
        $this->view->recentVacancy = $recentVacancy;	
	}
}